<?php

// 报表首页
class ReportAction extends Action
{

public function _initialize()
{
checkLoginSession();
}

public function index()
  {
    $pdtcodeDao = D("Product_cat_code");
    
    //dump('pdt' . $_SESSION['UserInfo']['user_id']);
    //DUMP(Think.session.UserInfo);
    $pdtcodeList = $pdtcodeDao->findAll();
    $this->assign('pdtcodeList', $pdtcodeList);
    
    //dump($pdtcodeList);
    $pdtDao = D("Product");
    $tname = 'Product';
    $Field = 'id_tb_product';
    $Asc = ' ASC';
    
    $searchwords = makeSearchWord();
    //dump($searchwords);
    $arrayVa = ShowTable($tname, $Field, $Asc, $searchwords);
    
    $pdtList = $arrayVa['a'];
    //dump($pdtList);
    //dump($list);
    $page = $arrayVa['b'];
    //dump($page);
    if (count($arrayVa['a']) < 1 or ($arrayVa['a'] == null))
    {
    $this->assign('empty', '没有要查询的记录');
    
    }
    //$pdtList = $pdtDao->findAll();
    $this->assign('pdtList', $pdtList);
    
    //$this->assign('content', 'Product:index');
    $this->assign('page', $page);
    $this->display('Product:index');
  }

}

?>